<template>
  <iframe
    id="iframeVue"
    :src="iframeURL"
    width="100%"
    height="100%"
    frameborder="no"
    border="0"
  />
</template>

  <script>
  import { getToken } from '@/utils/auth'
  import { getAppInfo } from '@/api/market/index'
  export default {
    data() {
      return {
        loading: false,
        iframeURL: '',
        id: this.$route.query.id
      }
    },
    watch: {
    },
    mounted() {
    },
    created() {
        const appId = this.$route.query.appId
        getAppInfo(appId).then(res => {
              if (res.code === 200) {
                var path = res.data.appPath
                if (path.indexOf('?') !== -1) {
                  path = path + '&'
                  } else {
                    path = path + '?'
                  }
                this.iframeURL = path + 'token=' + getToken()
                console.log(this.iframeURL)
              }
          }).catch(() => {
            this.loading = true
          })
    },
    method() {
    },
    methods: {
    }
  }
  </script>

  <style scoped>

  </style>

